package com.jinzhi.jzweb.service.impl.moduleConfig;

import com.baomidou.mybatisplus.plugins.Page;
import com.jinzhi.jzweb.domain.moduleConfig.SignGradeDO;
import com.jinzhi.jzweb.service.moduleConfig.SignGradeService;
import org.springframework.stereotype.Service;

import com.jinzhi.jzweb.dao.SignGradeDao;
import com.jinzhi.common.base.CoreServiceImpl;

import java.util.List;

/**
 * 
 * <pre>
 * 
 * </pre>
 * <small> 2024-03-05 16:18:09 | lance</small>
 */
@Service
public class SignGradeServiceImpl extends CoreServiceImpl<SignGradeDao, SignGradeDO> implements SignGradeService {

    //查询录分数据
    @Override
    public Page<SignGradeDO> entryAList(SignGradeDO signGradeDO) {
        Page<SignGradeDO> page = new Page<>(signGradeDO.getPageNumber(), signGradeDO.getPageSize());
        return page.setRecords(this.baseMapper.queryEntryAList(page));
    }

    /**
     * 通过id编辑或者新增录分
     * @param signGradeDO
     */
    @Override
    public void insertUpdateById(SignGradeDO signGradeDO) {
        if(null!=signGradeDO.getId()){
            this.updateById(signGradeDO);
        } else {
            this.insert(signGradeDO);
        }
    }
}
